package org.ezplatform.office.forum.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.ezplatform.core.annotation.MetaData;
import org.ezplatform.core.entity.BaseCorpEntity;

/**
 * @desc 论坛帖子信息实体类
 * @create 2017-11-14 19:34
 **/
/**
 * @author 15056
 *
 */
/**
 * @author 15056
 *
 */
@MetaData(value = "帖子信息")
@Entity(name = "ForumPost")
@Table(name = "oa_forum_post", uniqueConstraints = { @UniqueConstraint(columnNames = "id") })
public class ForumPost extends BaseCorpEntity{

    private static final long serialVersionUID = 3376361842685189522L;
    /**
     * 类型:1-主题帖;2-回复帖
     */
    @MetaData(value = "帖子类型")
    @Column(name = "type")
    private int type;

    /**
     * 主贴id
     */
    @MetaData(value = "主贴id")
    @Column(name = "post_id", length = 32)
    private String postId;

    /**
     * 主题
     */
    @MetaData(value = "主题")
    @Column(name = "title", length = 200)
    private String title;

    /**
     * 作者
     */
    @MetaData(value = "作者")
    @Column(name = "author", length = 50)
    private String author;

    /**
     * 是否匿名:1-是;0-否
     */
    @MetaData(value = "是否匿名")
    @Column(name = "is_anonymity")
    private int isAnonymity ;
    
    /**
     * 是否昵称:1-是;0-否
     */
    @MetaData(value = "是否昵称")
    @Column(name = "is_petname")
    private int isPetname ;
    
    /**
     * 昵称名称
     */
    @MetaData(value = "昵称名称")
    @Column(name = "petname")
    private String petname ;
    
    /**
     * 变更发表时间
     */
    @MetaData(value = "发表时间")
    @Column(name = "publish_time")
    private Date publishTime;
    
    /**
     * 帖子接收人
     */
    @MetaData(value = "帖子接收人")
    @Column(name = "receiver")
    private String receiver;

	/**
     * 所属版块
     */
    @MetaData(value = "所属版块")
    @Column(name = "board_id", length = 32 )
    private String boardId;

    /**
     * 内容
     */
    @MetaData(value = "内容")
    @Column(name = "content")
    private String content;

    /**
     * 是否置顶:1-是;0-否
     */
    @MetaData(value = "是否置顶")
    @Column(name = "is_top")
    private int isTop;
    
    /**
     * 是否加精:1-是;0-否
     */
    @MetaData(value = "是否加精")
    @Column(name = "is_essence")
    private String isEssence;

	/**
     * 置顶时间
     */
    @MetaData(value = "置顶时间")
    @Column(name = "top_date")
    private Date topDate;
    
	/**
     * 附件
     */
    @MetaData(value = "附件")
    @Column(name = "att_id", length = 2000 )
    private String attId;

    /**
     * 删除标识
     */
    @MetaData(value = "删除标识")
    @Column(name = "is_delete")
    private int isDelete;
    
    /**
     * 审核状态
     */
    @MetaData(value = "审核状态")
    @Column(name = "check_status")
    private String checkStatus;
    
    /**
     * 是否收藏
     */
    @MetaData(value = "是否收藏")
    @Column(name = "is_collection")
    private String isCollection;
    
    /**
     * 是否允许拷贝
     */
    @MetaData(value = "是否允许拷贝")
    @Column(name = "is_copy")
    private String isCopy;
    
    /**
     * 是否允许跟帖
     */
    @MetaData(value = "是否允许跟帖")
    @Column(name = "is_re_post")
    private String isRePost;
    
    /**
     * 是否允许编辑
     */
    @MetaData(value = "是否允许编辑")
    @Column(name = "is_edit_post")
    private String isEditPost;
    
    /**
     * 所属版块
     */
    @MetaData(value = "所属版块")
    @Column(name = "data_id", length = 32 )
    private String dataId;
    
    /**
     * 推送是否删除0:未删除，1：已删除
     */
    @MetaData(value = "推送是否删除")
    @Column(name = "is_push")
    private String isPush;
    
    /**
     * 驳回理由
     */
    @MetaData(value = "驳回理由")
    @Column(name = "rejection")
    private String rejection;
    
    /**
     * 发布类型
     */
    @MetaData(value = "发布类型")
    @Column(name = "publist_type")
    private Integer publistType;
    

	/**
     * 审核状态
     * @author 15056
     *
     */
    public enum CheckStatusEnum{
    	
    	/**
    	 * 草稿
    	 */
    	CHECK_STATUS_CG("草稿","0"),
    	
    	/**
    	 * 未审核
    	 */
    	CHECK_STATUS_WSH("未审核","1"),
    	
    	/**
    	 * 审核通过
    	 */
    	CHECK_STATUS_SHTG("审核通过","2"),
    	
    	/**
    	 * 审核不通过
    	 */
    	CHECK_STATUS_SHBTG("审核不通过","3"),
    	
    	/**
    	 * 无需审核
    	 */
    	CHECK_STATUS_WXSH("无需审核","4"),
    	/**
         * 应用管理员权限
         */
        YYGLYQX("应用管理员权限","appAdminRole"),
        /**
         * 精华
         */
        JH("精华","精华"),
        
        /**
         * 公告
         */
        GG("公告","公告"),
    	;
    	private String code;
        private String value;
        
        

        CheckStatusEnum(String code, String value) {
            this.code = code;
            this.value = value;
        }

		public String getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}

    }

    /**
     * 是否已读:1-是;0-否
     */
    @MetaData(value = "是否已读")
    @Column(name = "is_read")
    private Integer isRead ;
    
    public Integer getIsRead() {
		return isRead;
	}

	public void setIsRead(Integer isRead) {
		this.isRead = isRead;
	}
	
	 public String getIsEssence() {
		return isEssence;
	}

	public void setIsEssence(String isEssence) {
		this.isEssence = isEssence;
	}

    public Integer getPublistType() {
		return publistType;
	}

	public void setPublistType(Integer publistType) {
		this.publistType = publistType;
	}

	public String getReceiver() {
			return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
    
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getIsAnonymity() {
        return isAnonymity;
    }

    public void setIsAnonymity(int isAnonymity) {
        this.isAnonymity = isAnonymity;
    }

    public int getIsPetname() {
		return isPetname;
	}

	public void setIsPetname(int isPetname) {
		this.isPetname = isPetname;
	}

	public String getPetname() {
		return petname;
	}

	public void setPetname(String petname) {
		this.petname = petname;
	}

	public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public String getBoardId() {
        return boardId;
    }

    public void setBoardId(String boardId) {
        this.boardId = boardId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getIsTop() {
		return isTop;
	}

	public void setIsTop(int isTop) {
		this.isTop = isTop;
	}

	public String getAttId() {
        return attId;
    }

    public void setAttId(String attId) {
        this.attId = attId;
    }

    public int getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }

    public Date getTopDate() {
		return topDate;
	}

	public void setTopDate(Date topDate) {
		this.topDate = topDate;
	}

	public String getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(String checkStatus) {
		this.checkStatus = checkStatus;
	}

	public String getIsCollection() {
		return isCollection;
	}

	public void setIsCollection(String isCollection) {
		this.isCollection = isCollection;
	}

	public String getIsCopy() {
		return isCopy;
	}

	public void setIsCopy(String isCopy) {
		this.isCopy = isCopy;
	}

	public String getIsRePost() {
		return isRePost;
	}

	public void setIsRePost(String isRePost) {
		this.isRePost = isRePost;
	}

	public String getIsEditPost() {
		return isEditPost;
	}

	public void setIsEditPost(String isEditPost) {
		this.isEditPost = isEditPost;
	}

	public String getRejection() {
		return rejection;
	}

	public void setRejection(String rejection) {
		this.rejection = rejection;
	}

	public String getDataId() {
		return dataId;
	}

	public void setDataId(String dataId) {
		this.dataId = dataId;
	}

	public String getIsPush() {
		return isPush;
	}

	public void setIsPush(String isPush) {
		this.isPush = isPush;
	}


	
}
